<template>
  <div class="app-container">
    <el-form :inline="true">
      <el-form-item>
        <input type="text" class="input" placeholder="请输入您要查询的QQ号!" v-model="qqId">
      </el-form-item>
      <el-form-item>
        <el-button @click="getQQInfo" >查询</el-button>
      </el-form-item>
    </el-form>
    <div class="card">
      <div>头像地址：{{qqData.avatar}}</div>
      <div>QQ号：{{qqData.id}}</div>
      <div>昵称：{{qqData.name}}</div>
    </div>
  </div>
</template>

<script>
import request from '@/utils/request'

export default {
  /*根据QQ号查询QQ信息*/
  name: "Qq",
  data() {
    return {
      qqId: undefined,
      qqData: {},
    };
  },
  created() {
  },
  methods: {
    getQQInfo() {
      const qqId =this.qqId
      request({
        url: '/txcloud/qq/qq/getQQInfo',
        method: 'get',
        params: {qqId}
      }).then(res => {
        this.qqData = res.data
        console.log(this.qqData)
      })
    }
  }
};
</script>
<style lang="scss" scoped>
/* From uiverse.io by @Yaseen549 */
.input {
  border: none;
  border-radius: 15px;
  padding: 15px;
  background-color: #e8e8e8;
  box-shadow: 6px 6px 12px #ffffff,
  -6px -6px 12px #c5c5c5;
  font-size: medium;
  font-weight: bold;
  max-width: 200px;
}

.input:focus {
  outline-color: white;
  place-content: "请输入您要查询的QQ号!";
}

/* From uiverse.io by @namecho */
button,
button::after {
  padding: 16px 20px;
  font-size: 18px;
  background: linear-gradient(45deg, transparent 5%, #ff013c 5%);
  border: 0;
  color: #fff;
  letter-spacing: 3px;
  line-height: 1;
  box-shadow: 6px 0px 0px #00e6f6;
  outline: transparent;
  position: relative;
}

button::after {
  --slice-0: inset(50% 50% 50% 50%);
  --slice-1: inset(80% -6px 0 0);
  --slice-2: inset(50% -6px 30% 0);
  --slice-3: inset(10% -6px 85% 0);
  --slice-4: inset(40% -6px 43% 0);
  --slice-5: inset(80% -6px 5% 0);
  content: "HOVER ME";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 3%, #00e6f6 3%, #00e6f6 5%, #ff013c 5%);
  text-shadow: -3px -3px 0px #f8f005, 3px 3px 0px #00e6f6;
  clip-path: var(--slice-0);
}

button:hover::after {
  animation: 1s glitch;
  animation-timing-function: steps(2, end);
}

@keyframes glitch {
  0% {
    clip-path: var(--slice-1);
    transform: translate(-20px, -10px);
  }

  10% {
    clip-path: var(--slice-3);
    transform: translate(10px, 10px);
  }

  20% {
    clip-path: var(--slice-1);
    transform: translate(-10px, 10px);
  }

  30% {
    clip-path: var(--slice-3);
    transform: translate(0px, 5px);
  }

  40% {
    clip-path: var(--slice-2);
    transform: translate(-5px, 0px);
  }

  50% {
    clip-path: var(--slice-3);
    transform: translate(5px, 0px);
  }

  60% {
    clip-path: var(--slice-4);
    transform: translate(5px, 10px);
  }

  70% {
    clip-path: var(--slice-2);
    transform: translate(-10px, 10px);
  }

  80% {
    clip-path: var(--slice-5);
    transform: translate(20px, -10px);
  }

  90% {
    clip-path: var(--slice-1);
    transform: translate(-10px, 0px);
  }

  100% {
    clip-path: var(--slice-1);
    transform: translate(0);
  }
}

/* From uiverse.io by @alexruix */
/*Rainbow card*/
.card {
  --background: #f5f5f5;
  --green: #1FC11B;
  --yellow: #FFD913;
  --orange: #FF9C55;
  --red: #FF5555;
  --violet: #555BFF;
  width: 500px;
  height: 254px;
  display: flex;
  flex-direction: column;
  gap: 1em;
  background: var(--background);
  padding: 2rem;
  border: 3px solid var(--violet);
  box-shadow: 10px -10px 0 -3px var(--background), 10px -10px var(--green),
  20px -20px 0 -3px var(--background), 20px -20px var(--yellow),
  30px -30px 0 -3px var(--background), 30px -30px var(--orange),
  40px -40px 0 -3px var(--background), 40px -40px var(--red);
  transition: box-shadow 1s, top 1s, left 1s;
  margin: 3em;
}


/*Hover*/
.card:hover {
  box-shadow: 0 0 0 -3px var(--background), 0 0 0 0 var(--green),
  0 0 0 -3px var(--background), 0 0 0 0  var(--yellow),
  0 0 0 -3px var(--background), 0 0 0 0  var(--orange),
  0 0 0 -3px  var(--background), 0 0 0 0  var(--red);
}
</style>
